import request from '@/utils/request'

// 查询主任务信息列表
export function listInformation(query) {
  return request({
    url: '/board/information/list',
    method: 'get',
    params: query
  })
}

// 查询主任务信息详细
export function getInformation(id) {
  return request({
    url: '/board/information/' + id,
    method: 'get'
  })
}

// 新增主任务信息
export function addInformation(data) {
  return request({
    url: '/board/information',
    method: 'post',
    data: data
  })
}

// 修改主任务信息
export function updateInformation(data) {
  return request({
    url: '/board/information',
    method: 'put',
    data: data
  })
}

// 删除主任务信息
export function delInformation(id) {
  return request({
    url: '/board/information/' + id,
    method: 'delete'
  })
}

// 导出主任务信息
export function exportInformation(query) {
  return request({
    url: '/board/information/export',
    method: 'get',
    params: query
  })
}

export function getDirectorAreaList() {
  return request({
    url: '/board/information/directorAreaQuery',
    method: 'get'
  })
}

export function userPost(){
  return request({
    url: '/board/information/getUserPost',
    method:'get'
  })
}


export function areaList(){
  return request({
    url: '/board/information/getAreaList',
    method:'get'
  })
}

export function getCompanyList(query) {
  return request({
    url: '/board/information/getCompanyList',
    method: 'get',
    params: query
  })
}

export function getRandomList() {
  return request({
    url: '/board/information/getRandomList',
    method: 'get'
  })
}

export function getTemplateList() {
  return request({
    url: '/board/information/getTemplateList',
    method: 'get'
  })
}

export function getDeptUserList() {
  return request({
    url: '/board/information/getDeptUserList',
    method: 'get'
  })
}

export function getCheckedCompanyListFromDB(taskId) {
  return request({
    url: '/board/information/getCheckedCompanyListFromDB/' + taskId,
    method: 'get'
  })
}


export function getUserId() {
  return request({
    url: '/board/information/getUserId',
    method: 'get'
  })
}

export function getValidateCheckResult(data) {
  return request({
    url: '/board/information/validateCheck',
    method: 'get'
  })
}

export function getZqCompanyList(taskId) {
  return request({
    url: '/board/information/getZqCompanyList/' + taskId,
    method: 'get'
  })
}
